	<div class="column half fl">
		
		<div class="box themed_box">
		<h2 class="box-header"><?php echo $title; ?></h2>

		<div class="box-content">
        <?php echo $this->session->flashdata('message'); ?>
		
        
        
        <form id="formtest" name="formtest" method="post" action="<?php echo site_url($form['action']); ?>">
            <?php if($table['value']<>"") { ?>
            <input type="hidden" name="id" value="<?php echo $table['value']['id']; ?>" />
            <?php } ?>
            
            <label class="form-label"><?php echo $this->lang->line('users'); ?></label>
            <input id="user_id" class="form-field width10" name="user_id" type="text" value="<?php if($table['value']<>"") { echo $table['value']['username']; } ?>" maxlength="100"/>
            <div id="box-con" class="dialog" title="<?php echo $this->lang->line('users'); ?>">
			    <table class="display" id="tabledata">
	<thead>
		<tr>
			<th><?php echo $this->lang->line('user_no');?></th>
			<th><?php echo $this->lang->line('user_name');?></th>
			<th><?php echo $this->lang->line('user_call');?></th>
            <th><?php echo $this->lang->line('gender');?></th>
            <th><?php echo $this->lang->line('tlp');?></th>
			<th><?php echo $this->lang->line('user_group');?></th>
			<th><?php echo $this->lang->line('user_pos');?></th>
  	        <th></th>
		</tr>
	</thead>
	<tbody>
	<?php foreach($table['users'] as $rec): ?>
		<tr class="gradeX">

			<td><?php echo $rec['user_no'] ?></td>
			<td><?php echo $rec['name'] ?></td>
			<td><?php echo $rec['username'] ?></td>
            <td><?php echo $rec['gender'] ?></td>
            <td><?php echo $rec['tlp'] ?></td>
			<td class="center"><?php echo $rec['group_name'] ?></td>
			<td class="center"><?php echo $rec['pos_name'] ?></td>
            <td><a class="button themed closer" href="#" onclick="changeBgr('<?php echo $rec['username'];?>')" ><?php echo $this->lang->line('add_list'); ?></a></td>
		</tr>
	<?php endforeach;?>	
	</tbody>
	</table>
                <p class="fr">
				<a class="button white">cancel</a>
				<a class="button themed closer">ok</a>
				</p>

            </div>
            <button onclick="document.formtest.user_id.value=''" class="button themed opener"><?php echo $this->lang->line('search_user') ?></button>

            
            <label class="form-label required"><?php echo $this->lang->line('call_name'); ?></label>
			<input id="form-no" class="form-field width60" name="call" type="text"   value="<?php if($table['value']<>"") { echo $table['value']['call_name']; } ?> " maxlength="50"/>
            
			<label class="form-label required"><?php echo $this->lang->line('contact_name'); ?></label>
			<input id="form-name" class="form-field width60" name="name" type="text" value="<?php if($table['value']<>"") { echo $table['value']['contact_name']; } ?>" maxlength="100"/>
            
            <label class="form-label required"><?php echo $this->lang->line('contact_number'); ?></label>
			<input id="form-name" class="form-field width60" name="tlp" type="text" value="<?php if($table['value']<>"") { echo $table['value']['contact_number']; } ?>" maxlength="255"/>
   
            
            <label class="form-label"><?php echo $this->lang->line('contact_result'); ?></label>
			<textarea id="form-message" class="form-field width90" name="result" cols="" rows="2"><?php if($table['value']<>"") { echo $table['value']['contact_result']; } ?></textarea>
			
			<input id="reset" class="button red" type="button" value="Reset" name="reset" />
			<input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
		</form>
		</div>

		</div>	
			
	</div>

	<!--
	<div class="column half fr">
		<div class="box themed_box">

		<h2 class="box-header-new"></h2>
		<h2 class="box-header"><?php echo $this->lang->line('pos'); ?></h2>
			
			<div class="box-content box-table">
			
            <?php echo $this->session->flashdata('message2'); ?>
            
			<table class="tablebox">
				<thead class="table-header">
					<tr>
						<th><?php echo $this->lang->line('pos'); ?></th>
						<th><?php echo $this->lang->line('status'); ?></th>
						<th class="tc"></th>
					</tr>
				</thead>
				
				<tbody class="openable-tbody">
                    <?php $i=1; ?>
					<?php foreach($table['pos'] as $rec): ?>
                    <?php if($i % 2 == 0): 
                            $zebra="odd";
                          else: 
                            $zebra="even";
                          endif;
                    ?>
                    <tr class="<?php echo $zebra;?>">
						<td class="width80">
							<h5><?php echo $rec['pos_name']; ?></h5>
		
						</td>
						<td class="tc">

							<span class="bullet bullet-green"></span>
						</td>
						<td class="tc">
						<a class="button themed openable"><span class="icon_single extend"></span></a>
						</td>
					</tr>
                    
					<tr class="odd openable-tr">
						<?php echo form_open($this->config->item('update_pos')); ?>
                        <td colspan="4">
							<div class="fl typo">
							<b><?php $this->config->item('pos'); ?></b>
							<p class="p_justify">
                              <input id="form-id" name="id" type="hidden" value="<?php echo $rec['id']; ?>" />
							  <input id="form-name" class="form-field width150" name="name" type="text" value="<?php echo $rec['pos_name']; ?>" maxlength="200"/>
							</p>
							</div>

							<div class="fl typo">
								<b>Published by: </b>
								<a href="#"><?php echo $rec['user_stamp']; ?></a> 
							</div>

							
							<div class="s_3"></div>
							
							<div class="fl typo">
								<b>Published date: </b>
                                <?php if($rec['date_stamp']=='0000-00-00'): ?>
                                    -
                                <?php else: ?>
								<a href="#"><?php echo $rec['date_stamp']; ?></a>
                                <?php endif; ?> 
							</div>
						
							<div class="fr">
								 <input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('delete');?>" name="delete" />
								 <input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
							</div>
						<?php echo form_close();?>
						<div class="clear"></div>
						</td>
					</tr>
                    <?php $i++; endforeach;?>
					
                    <tr>
						<td class="width80">
							<h5><?php echo $this->lang->line('add'); ?></h5>
		
						</td>
						<td class="tc">

							
						</td>
						<td class="tc">
						<a class="button themed openable"><span class="icon_single extend"></span></a>
						</td>
					</tr>
                    
					<tr class="odd openable-tr">
						<td colspan="4">
                        <?php echo form_open($this->config->item('add_pos')); ?>
							<div class="fl typo">
							<b><?php $this->config->item('pos'); ?></b>
							<p class="p_justify">
							  <input id="form-name" class="form-field width150" name="name" type="text" value="" maxlength="200"/>
							</p>
							</div>

							<div class="s_3"></div>
							
												
							<div class="fr">
								<input id="validate" class="button themed" type="submit" value="<?php echo $this->lang->line('save');?>" name="save" />
							</div>
						
						<div class="clear"></div>
                        <?php echo form_close();?>
						</td>
					</tr>
                    
				</tbody>
			</table>
            
				<ul class="pagination">
				<li><a class="button white" href="#">previous</a></li>

				<li><a class="button white" href="#">1</a></li>
				<li><a class="button white" href="#">2</a></li>
				<li><a class="button white active" href="#">3</a></li>
				<li><a class="button white" href="#">4</a></li>
				<li><a class="button white" href="#">5</a></li>
				<li><a class="button white" href="#">6</a></li>

				<li><a class="button white" href="#">next</a></li>
				</ul>
              
			</div>
		</div>			
	</div>
    -->
 
<script type="text/javascript">
    function changeBgr(isi) {
    document.formtest.user_id.value = isi;
    document.getElementById('box-con').style.display = 'none';
    } 
</script>   